﻿@model IEnumerable<Capacitacion.Models.Review>
@{
    ViewBag.Title = "Index";
}
<h2>Reviews</h2>
@using (Html.BeginForm("Index", "Reviews", FormMethod.Get))
{
    <div>
        @ViewBag.MSG
        @Html.DropDownList("rating", new SelectList(ViewBag.Ratings), "All")
        <input type="submit" value="Go!" />
    </div>
}
<div id="timeDisplay">
</div>
<div id="latestReview">
    @Ajax.ActionLink("Get the latest Review", "LatestReviews", new AjaxOptions
    {
        UpdateTargetId = "latestReview",
        InsertionMode = InsertionMode.Replace,
        HttpMethod = "GET",
        LoadingElementId = "progress",
    })
</div>
<div id="progress">
    <img src="../../img/10.gif" />
</div>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<div id="Mauro">
    @foreach (var item in Model)
    {
        @Html.Partial("_Review", item)
    }
</div>
<p>
    @Html.ActionLink("Back to Home", "Index", "Home")
</p>
@section Footer
{
    <p>
        Mauro Villaseco
    </p>
}
